package com.gxuwz.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;


/**
 * 实验室实体
 * 
 * @author 小胡
 * @date 2017年5月28日
 */
@Entity
@Table(name = "sys_laboratory")
public class SysLaboratory extends BaseEntity{

	private static final long serialVersionUID = -5599906124763003932L;

	@Column(name = "lab_name")
	private String labName; // 实验室名称
	@Column(name = "lab_seat_num")
	private Integer labSeatNum; // 实验室座位数
	@Column(name = "lab_desc")
	private String labDesc; // 实验室描述
	@Column(name = "lab_create_date")
	private String createDate; // 创建日期
	@ManyToMany(mappedBy = "user_lab")
	private Set<SysUser> lab_user;
	@Column(name = "lab_create_user_name")
	private String createUserName; // 创建该角色的用户ID
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dept_id")
	private SysDepartment department;
	
	@OneToMany(mappedBy="laboratory",cascade = {CascadeType.MERGE, CascadeType.PERSIST,
			CascadeType.REFRESH})
	private Set<SysEquipment> equipments = new HashSet<SysEquipment>();
	
	
	public SysLaboratory() {
	}

	public String getLabName() {
		return labName;
	}

	public void setLabName(String labName) {
		this.labName = labName;
	}

	public Integer getLabSeatNum() {
		return labSeatNum;
	}

	public void setLabSeatNum(Integer labSeatNum) {
		this.labSeatNum = labSeatNum;
	}

	public String getLabDesc() {
		return labDesc;
	}

	public void setLabDesc(String labDesc) {
		this.labDesc = labDesc;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public Set<SysUser> getLab_user() {
		return lab_user;
	}

	public void setLab_user(Set<SysUser> lab_user) {
		this.lab_user = lab_user;
	}

	public SysDepartment getDepartment() {
		return department;
	}

	public void setDepartment(SysDepartment department) {
		this.department = department;
	}

}
